package com.itheima.d1_algorithm;

import static java.util.Arrays.binarySearch;

public class Test3 {
    public static void main(String[] args) {
        //二分查找
        int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9};
        System.out.println(binarySearch(arr, 0, arr.length - 1, 5));
    }
}
